package com.allo2o.common.convertor;

import com.allo2o.common.VO.MerchantBillVO;
import com.allo2o.common.domain.MerchantBillDO;
import org.springframework.beans.BeanUtils;

/**
 * Created by lubingbing on 16-5-13.
 *
 * @auth lubingbing
 */
public class MerchantBillConvertor {

    /**
     * <ul>
     *     merchantbill convertor
     * </ul>
     * @param vo vo
     * @return dto
     */
    public static MerchantBillDO VO2DOConvert(MerchantBillVO vo) {
        MerchantBillDO dto = new MerchantBillDO();
        BeanUtils.copyProperties(vo, dto);
        return dto;
    }

    /**
     * <ul>
     *     merchantbill convertor
     * </ul>
     * @param dto dto
     * @return vo
     */
    public static MerchantBillVO DO2VOConvert(MerchantBillDO dto) {
        MerchantBillVO vo = new MerchantBillVO();
        BeanUtils.copyProperties(dto, vo);
        return vo;
    }
}
